import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 18,
    menuWidth: 60,
    menu: false,
    header: true,
    column: [
      {
        label: '船舶名称',
        prop: 'shipName',
        search: true,
        overHidden: true,
        width: 200
      },
      {
        label: 'MMSI',
        prop: 'mmsi',
        overHidden: true,
        width: 100
      },
      {
        label: '船舶识别号',
        prop: 'shipIdentifyNo',
        overHidden: true,
        width: 180
      },
      {
        label: '船舶类别',
        prop: 'shipLargeType',
        search: false,
        width: 100,
        overHidden: true,
        type: 'select',
        dicData: self.shipSTypeArr,
        filterable: true,
        props: {
          label: 'lable',
          value: 'value'
        }
      },
      {
        label: '船舶类型',
        prop: 'shipType',
        search: true,
        width: 100,
        overHidden: true,
        type: 'select',
        dicData: self.shipTypeArr,
        filterable: true,
        props: {
          label: 'lable',
          value: 'value'
        }
      },
      {
        label: '船公司名称',
        search: true,
        prop: 'tenantName',
        overHidden: true
      },
      {
        label: 'AI智能监控安装时间',
        prop: 'installDate',
        width: 200,
      },
      {
        label: '船舶联系人',
        prop: 'contactName',
        width: 130,
      },
      {
        label: '船舶联系人电话',
        prop: 'contactPhone',
        width: 140,
      },



      // {
      //   label: '船籍港',
      //   prop: 'homePort',
      //   width: 100,
      //   overHidden: true,
      //   type: 'select',
      //   dicData: self.homePortArr
      // },
      // {
      //   label: '航线',
      //   prop: 'shipRegionType',
      //   search: true,
      //   width: 180,
      //   type: 'select',
      //   dicData: [
      //     { label: '内河船', value: '0' },
      //     { label: '海船', value: '1' },
      //     { label: '国际航行', value: '2' }
      //   ]
      // },
      // {
      //   label: '船舶总吨（吨）',
      //   prop: 'totalTon',
      //   overHidden: true,
      //   width: 140
      // },
      // {
      //   label: '总吨范围',
      //   prop: 'tonRange',
      //   search: true,
      //   hide: true
      // },
      {
        label: '登记机构',
        prop: 'registPort',
        type: 'cascader',
        width: 180,
        dicData: self.registArr,
        props: {
          label: 'orgShortName',
          value: 'orgCode',
          children: 'children'
        },
        filterable: true,
        search: true
      }
    ]
  }
}
